package cn.edu.jmu.oelp.pojo;

public class RespEntity {
    private int code;
    private String msg;
    private Object data;
    private String token;

    public RespEntity(RespCode respCode, Object data,String token) {
        this.code=respCode.getCode();
        this.data=data;
        this.token=token;
        this.msg=respCode.getMsg();
    }

    public RespEntity(RespCode respCode) {
        this.code = respCode.getCode();
        this.msg = respCode.getMsg();
    }

    public RespEntity(RespCode respCode, Object data) {
        this.code=respCode.getCode();
        this.data = data;
        this.msg=respCode.getMsg();
    }

    @Override
    public String toString() {
        return "RespEntity{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                ", token='" + token + '\'' +
                '}';
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}